<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

</body>
<script>
    /*var arr = [{name:"damu"},{name:"laofu"},{name:"陪悦"}]
    arr.forEach(function (item,index){
        setTimeout(function (){
            console.log(item.name)
        },1000*index)
    })*/


    var obj = {
        name:"damu",
        wifes:[{name:"陪悦"},{name:"老付"},{name:"芳芳"}],
        marry:function (){
            this.wifes.forEach(function (wife,index){
                var that = this;
                setTimeout(function (){
                    console.log(that.name + "❤" + wife.name);
                },1000*index)
            },obj)
        }
    }
    obj.marry()


</script>
</html>
